"""
ROYHAT 2022.08.08
"""

a = {'a':10, 'b':7, 'd':8, 'e': 9}
print(a) # {'a':10, 'b':7, 'd':8, 'e': 9}

b = sorted(a, key=a.get)
print(b) # ['b', 'd', 'e', 'a']

d = sorted(a, key=a.get, reverse=True)
print(d) # ['a', 'e', 'd', 'b']

e = sorted(a, key=a.get, reverse=False)
print(e) # ['b', 'd', 'e', 'a']
